object frmIncomigDoc: TfrmIncomigDoc
  Left = 252
  Top = 138
  BorderStyle = bsDialog
  Caption = #1044#1086#1093#1086#1076#1099' '#1075#1088#1072#1078#1076#1072#1085#1080#1085#1072
  ClientHeight = 185
  ClientWidth = 425
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  Position = poMainFormCenter
  DesignSize = (
    425
    185)
  PixelsPerInch = 96
  TextHeight = 13
  object bCancel: TButton
    Left = 329
    Top = 156
    Width = 95
    Height = 25
    Anchors = [akRight, akBottom]
    Caption = #1042#1099#1093#1086#1076
    ModalResult = 2
    TabOrder = 0
  end
  object bSave: TButton
    Left = 229
    Top = 156
    Width = 95
    Height = 25
    Anchors = [akRight, akBottom]
    Caption = #1057#1086#1093#1088#1072#1085#1080#1090#1100
    TabOrder = 1
  end
  object GroupBox1: TGroupBox
    Left = 0
    Top = 0
    Width = 425
    Height = 149
    Align = alTop
    Anchors = [akLeft, akTop, akRight, akBottom]
    TabOrder = 2
    object Label1: TLabel
      Left = 12
      Top = 20
      Width = 141
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1058#1080#1087' '#1076#1086#1082#1091#1084#1077#1085#1090#1072
    end
    object Label2: TLabel
      Left = 12
      Top = 43
      Width = 141
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #8470' '#1076#1086#1082#1091#1084#1077#1085#1090#1072
    end
    object Label3: TLabel
      Left = 12
      Top = 67
      Width = 141
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1044#1077#1081#1089#1090#1074#1091#1077#1090' '#1089
    end
    object Label4: TLabel
      Left = 272
      Top = 67
      Width = 33
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1087#1086
    end
    object Label5: TLabel
      Left = 12
      Top = 92
      Width = 141
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1057#1088#1077#1076#1085#1077#1084#1077#1089#1103#1095#1085#1099#1081' '#1076#1086#1093#1086#1076
    end
    object Label6: TLabel
      Left = 12
      Top = 116
      Width = 141
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1055#1088#1080#1084#1077#1095#1072#1085#1080#1077
    end
    object lcbDocType: TDBLookupComboboxEh
      Left = 164
      Top = 17
      Width = 245
      Height = 19
      AlwaysShowBorder = True
      DataField = 'TYPE_ID'
      DataSource = dsc_Incoming
      EditButtons = <>
      Flat = True
      KeyField = 'ID'
      ListField = 'NAME'
      ListSource = dsc_DocType
      TabOrder = 0
      Visible = True
    end
    object dbdeEDate: TDBDateTimeEditEh
      Left = 316
      Top = 64
      Width = 93
      Height = 19
      AlwaysShowBorder = True
      DataField = 'EDATE'
      DataSource = dsc_Incoming
      EditButtons = <>
      Flat = True
      Kind = dtkDateEh
      TabOrder = 1
      Visible = True
    end
    object dbdeBDate: TDBDateTimeEditEh
      Left = 164
      Top = 64
      Width = 93
      Height = 19
      AlwaysShowBorder = True
      DataField = 'BDATE'
      DataSource = dsc_Incoming
      EditButtons = <>
      Flat = True
      Kind = dtkDateEh
      TabOrder = 2
      Visible = True
    end
    object dbeNote: TDBEditEh
      Left = 164
      Top = 112
      Width = 245
      Height = 19
      AlwaysShowBorder = True
      DataField = 'DESCRIPT'
      DataSource = dsc_Incoming
      EditButtons = <>
      Flat = True
      TabOrder = 3
      Visible = True
    end
    object dbeSumma: TDBEditEh
      Left = 164
      Top = 88
      Width = 93
      Height = 19
      AlwaysShowBorder = True
      DataField = 'MONTH_SUMMA'
      DataSource = dsc_Incoming
      EditButtons = <>
      Flat = True
      TabOrder = 4
      Visible = True
    end
    object dbeDocument: TDBEditEh
      Left = 164
      Top = 40
      Width = 245
      Height = 19
      AlwaysShowBorder = True
      DataField = 'INCOMING_DOC'
      DataSource = dsc_Incoming
      EditButtons = <>
      Flat = True
      TabOrder = 5
      Visible = True
    end
  end
  object dsc_DocType: TDataSource
    DataSet = ds_DocType
    Left = 312
    Top = 16
  end
  object dsc_Incoming: TDataSource
    DataSet = ds_Incoming
    Left = 284
    Top = 84
  end
  object LocalTrans: TpFIBTransaction
    DefaultDatabase = MAINDM.pMainDatabase
    TimeoutAction = TARollback
    Left = 52
    Top = 48
  end
  object ds_DocType: TpFIBDataSet
    SelectSQL.Strings = (
      'SELECT'
      '    ID,'
      '    NAME'
      'FROM'
      '    CLIENTS_INCOMING_DOCTYPE '
      'order by 2')
    Transaction = LocalTrans
    Database = MAINDM.pMainDatabase
    Left = 280
    Top = 16
    object ds_DocTypeID: TFIBIntegerField
      FieldName = 'ID'
    end
    object ds_DocTypeNAME: TFIBStringField
      FieldName = 'NAME'
      Size = 60
      EmptyStrToNull = True
    end
  end
  object ds_Incoming: TpFIBDataSet
    UpdateSQL.Strings = (
      'UPDATE CLIENTS_INCOMING'
      'SET '
      '    TYPE_ID = :TYPE_ID,'
      '    BDATE = :BDATE,'
      '    EDATE = :EDATE,'
      '    DESCRIPT = :DESCRIPT,'
      '    MONTH_SUMMA = :MONTH_SUMMA,'
      '    INCOMING_DOC = :INCOMING_DOC'
      'WHERE'
      '    ID = :OLD_ID'
      '    ')
    DeleteSQL.Strings = (
      'DELETE FROM'
      '    CLIENTS_INCOMING'
      'WHERE'
      '        ID = :OLD_ID'
      '    ')
    InsertSQL.Strings = (
      'INSERT INTO CLIENTS_INCOMING('
      '    ID,'
      '    CLIENT_ID,'
      '    TYPE_ID,'
      '    BDATE,'
      '    EDATE,'
      '    DESCRIPT,'
      '    MONTH_SUMMA,'
      '    INCOMING_DOC'
      ')'
      'VALUES('
      '    :ID,'
      '    :CLIENT_ID,'
      '    :TYPE_ID,'
      '    :BDATE,'
      '    :EDATE,'
      '    :DESCRIPT,'
      '    :MONTH_SUMMA,'
      '    :INCOMING_DOC'
      ')')
    RefreshSQL.Strings = (
      'SELECT'
      '    ID,'
      '    CLIENT_ID,'
      '    TYPE_ID,'
      '    BDATE,'
      '    EDATE,'
      '    DESCRIPT,'
      '    MONTH_SUMMA,'
      '    INCOMING_DOC'
      'FROM'
      '    CLIENTS_INCOMING '
      'where(  id = :pinc_id'
      '     ) and (     CLIENTS_INCOMING.ID = :OLD_ID'
      '     )'
      '    '
      '')
    SelectSQL.Strings = (
      'SELECT'
      '    ID,'
      '    CLIENT_ID,'
      '    TYPE_ID,'
      '    BDATE,'
      '    EDATE,'
      '    DESCRIPT,'
      '    MONTH_SUMMA,'
      '    INCOMING_DOC'
      'FROM'
      '    CLIENTS_INCOMING '
      'where id = :pinc_id'
      '')
    Transaction = LocalTrans
    Database = MAINDM.pMainDatabase
    Left = 252
    Top = 84
    object ds_IncomingID: TFIBIntegerField
      FieldName = 'ID'
    end
    object ds_IncomingCLIENT_ID: TFIBIntegerField
      FieldName = 'CLIENT_ID'
    end
    object ds_IncomingTYPE_ID: TFIBIntegerField
      FieldName = 'TYPE_ID'
    end
    object ds_IncomingBDATE: TFIBDateField
      FieldName = 'BDATE'
    end
    object ds_IncomingEDATE: TFIBDateField
      FieldName = 'EDATE'
    end
    object ds_IncomingDESCRIPT: TFIBStringField
      FieldName = 'DESCRIPT'
      Size = 120
      EmptyStrToNull = True
    end
    object ds_IncomingMONTH_SUMMA: TFIBBCDField
      FieldName = 'MONTH_SUMMA'
      Size = 2
      RoundByScale = True
    end
    object ds_IncomingINCOMING_DOC: TFIBStringField
      FieldName = 'INCOMING_DOC'
      Size = 60
      EmptyStrToNull = True
    end
  end
end
